import komand
from .schema import DeleteMalwareInput, DeleteMalwareOutput, Input, Output, Component
from ...util import project


class DeleteMalware(komand.Action):

    def __init__(self):
        super(self.__class__, self).__init__(
                name='delete_malware',
                description=Component.DESCRIPTION,
                input=DeleteMalwareInput(),
                output=DeleteMalwareOutput())

    def run(self, params={}):
        project.Project(self.connection.config, params.get("project_name")).get_malware(params.get("sha256")).delete()
        return {}
